import {createApp, markRaw} from 'vue'

import App from './App.vue'

// 引入通用样式
import "src/assets/css/reSet.css";
// 引入通用样式表
import "src/assets/css/animation.css";
// 引入全局的css样式
import "src/assets/css/globalVariable.css";
// 引入icon库
import "src/assets/css/iconfont/iconfont.css";
// 引入动画库
import "animate.css";

import type {Router} from 'vue-router';
// 引入路由
import router from './router/index.js'
// 引入pinia
import {createPinia} from 'pinia';

import 'vant/lib/index.css';

import AutoComponents from "src/components/glob/AutoComponents"

declare module 'pinia' {
    export interface PiniaCustomProperties {
        /* @ts-ignore */
        router: Router;
    }
}
const _pinia = createPinia();

_pinia.use(({store}) => {
    store.router = markRaw(router);
});


const app = createApp(App);


app.use(router).use(_pinia).use(AutoComponents)

app.mount('#app')
